<?php

/**
 * The base controller which is used by the Front and the Admin controllers
 */
class My_Controller extends CI_Controller {}


class CAdmin extends My_Controller {

	public $theme_data = array(
		'layout_main'=>'admin/include/layout',
	);
	public $mytable = "admin";
	public $heading = "";
	
	function __construct()
	{
		parent::__construct();
		$this->load->model("admin/auser");
		if(!$this->auser->isAdmin()){
		redirect($this->template->url_admin);	
			echo $this->load->view('admin/login/index','',true);
		die("");
		}
	}
}
 